package com.xl.studentpass.service.impl;

import com.xl.studentpass.mapper.CategoryMapper;
import com.xl.studentpass.entity.CategoryTaskEntity;
import com.xl.studentpass.service.CategoryService;
import com.xl.studentpass.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: xl
 * @createTime: 2023/5/27 15:47:43
 * @program: student-pass
 * @e-mail: 2199396150@qq.com
 * @description:
 */
@Service
@Slf4j
public class CategoryServiceImpl implements CategoryService {
    @Resource
    CategoryMapper categoryMapper;

    @Override
    public R getCate() {
        List<CategoryTaskEntity> categories = categoryMapper.selectList(null);
        return R.ok().put("data", categories);
    }
}
